package com.gome.wechat.program.service.impl;

import com.gome.wechat.program.dao.GroupPictureRepo;
import com.gome.wechat.program.entity.GroupPicture;
import com.gome.wechat.program.service.GroupPictureService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * Created by liwei113 on 2017/11/17 0017.
 */
@Service
public class GroupPictureServiceImpl implements GroupPictureService {

    @Autowired
    GroupPictureRepo groupPictureRepo;

    @Override
    public List<GroupPicture> saveList(List<GroupPicture> groupPictures) {
        return groupPictureRepo.save(groupPictures);
    }

    @Override
    public void deleteByGroupActivityId(Long groupActivityId) {
        groupPictureRepo.deleteByGroupActivityId(groupActivityId);
    }

    @Override
    public List<GroupPicture> findByGroupActivityId(Long groupActivityId) {
        return groupPictureRepo.findByGroupActivityId(groupActivityId);
    }
}
